(ns syncode.xchange.collector.configuration  
  (:use net.cgrand.enlive-html))

;selector functions for each exchanger

(defn selector-panter [resource] (rest (select resource [:table.kursna :> [:tr (but :tr.head)]])))

(defn selector-kombank [resource] (rest(rest(select resource [:table :tr]))))

(defn selector-raiffeisen [resource] (rest(rest(select resource [:table.table_main1 :tr]))))

(defn selector-vip [resource] (select resource [:table.table-style01 :> [:tr (but :tr.head)]]))

(def uris {     :raiffeisen "http://www.raiffeisenbank.rs/code/navigate.aspx?Id=290"
                :vip "http://www.vipsistem.rs/kursna-lista.php"
                :kombank "http://www.kombank.com/inc/kurs.asp"
                :panter "http://www.menjacnica-panter.co.rs/index.php?q=main/home"})

(def positions {:raiffeisen {:currency 3 :denomination 4 :buying 5 :selling 7}
                :vip {:currency 3 :denomination 5 :buying 6 :selling 7}
                :kombank {:currency 2 :denomination 3 :buying 4 :selling 6}
                :panter {:currency 3 :denomination 4 :buying 5 :selling 6}})

(def rate-selectors {:raiffeisen selector-raiffeisen
                :vip selector-vip
                :kombank selector-kombank
                :panter selector-panter})